#include "ZigbusAnalogicReference.h"

ZigbusAnalogicReference::ZigbusAnalogicReference()
    : ZigbusItem(-1, ANALOG_REF_SIZE)
{
}

ZigbusAnalogicReference::ZigbusAnalogicReference(int value)
    : ZigbusItem(value, ANALOG_REF_SIZE)
{
}

ZigbusAnalogicReference::ZigbusAnalogicReference(const ZigbusAnalogicReference &other)
    : ZigbusItem(other)
{
}

QString ZigbusAnalogicReference::text() const
{
    switch(getValue()) {
    case REF_ANALOG_DEFAULT: return "default";
    case REF_ANALOG_INTERNAL: return "internal";
    case REF_ANALOG_INTERNAL_1V1: return "internal_1v1";
    case REF_ANALOG_INTERNAL_2V56: return "internal_2v56";
    case REF_ANALOG_EXTERNAL: return "external";
    default: return "undefined";
    }
}
